import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: 'http://psbc.jumpcity.cm/admin/video/list',
    method: 'get',
    params: query
  })
}

export function fetchVideo(id) {
  return request({
    url: 'http://psbc.jumpcity.cm/api/video/detail',
    method: 'get',
    params: { id }
  })
}

export function createVideo(data) {
  return request({
    url: 'http://psbc.jumpcity.cm/admin/video/create',
    method: 'post',
    // headers: {'Content-Type': 'multipart/form-data'},
    data
  })
}

export function updateVideo(data) {
  return request({
    url: 'http://psbc.jumpcity.cm/admin/video/update',
    method: 'post',
    data
  })
}
